<?
class add_module extends api{
    protected $view;
    protected $model;
    protected $db;
    protected $lang;

    function __construct(&$db,&$view,$name,&$lang_m){
      require_once SITE_DIR."modules/".$name."/".$name."_model".".class.php";

      if(file_exists(SITE_DIR."lang/admin/modules/".$name."/ru.ini") && $this->_access()){
      $lang=parse_ini_file(SITE_DIR."lang/admin/modules/".$name."/ru.ini",false);
      $this->lang=$lang;
      }else{      $this->lang=&$lang_m;
      }
      $this->view=&$view;
      $name=$name."_model";
      $this->model= new $name(&$db);
      $this->db=&$db;



    }




    }
?>